#!/bin/bash
wget https://golang.google.cn/dl/go1.17.6.linux-amd64.tar.gz
tar zxvf go1.17.6.linux-amd64.tar.gz -C /usr/local
rm go1.17.6.linux-amd64.tar.gz

# setup environment varibales
echo 'export GOPATH=/usr/local/go'>>~/.bashrc
echo 'export PATH=$GOPATH/bin:$PATH'>>~/.bashrc
echo 'export GOROOT=/usr/local/go'>>~/.bashrc
echo 'export GOPATH=$PATH:$GOROOT/bin'>>~/.basrc

